// JavaScript Document
function custGetAll() {
	$.getJSON(
		"cBasic/basic_readall.php?obj=customer"+ "&" + Date.parse(new Date()),
		function(json){
			var title=json.title;
			var aaa=json.aaData;
			
			$('#Customer .recsbox').html("");
			$('#Customer .recsbox').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="tCustomer"></table>' );
			$('#tCustomer').dataTable({	
				"bAutoWidth": true,
				"bStateSave": true,
				"sScrollX": "100%",
				"sScrollXInner": "100%",
				"bScrollCollapse": false,
				"sPaginationType": "full_numbers",
				"aaData":aaa,
				"aoColumns": [
					{ "sTitle":"ID"},
					{ "sTitle":"FName"},
					{ "sTitle":"LName"},
					{ "sTitle":"Street","bVisible":false},
					{ "sTitle":"City"},
					{ "sTitle":"State","bVisible":false},
					{ "sTitle":"Country","bVisible":false},
					{ "sTitle":"Postcode","bVisible":false},
					{ "sTitle":"Phone","bVisible":false},
					{ "sTitle":"Mobile","bSortable": false},
					{ "sTitle":"Fax","bVisible":false},
					{ "sTitle":"Email"},
					{ "sTitle":"Note","bVisible":false},
					{ "sTitle":"Regdate"}
				],
				"aaSorting": [[ 2, "asc" ]]
			})
			$(".btool").click(function(){recsNew(title,'customer');})
			tableEdit(json,aaa,title,'customer','#viewbox');
		}
	)
}
